package com.rumor.background.Configurations;

import org.springframework.stereotype.Component;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Component
public class MyConfiguration implements WebMvcConfigurer {

    /**
     * 虚拟路径配置
     * @param registry
     */
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("/RUMOR/**").addResourceLocations("file:RUMOR/");
        registry.addResourceHandler("/LOST/**").addResourceLocations("file:LOST/");
        registry.addResourceHandler("/FOUND/**").addResourceLocations("file:FOUND/");
        WebMvcConfigurer.super.addResourceHandlers(registry);
    }
}